package com.bw.goods.mvvm.adapter;

import com.bw.goods.R;
import com.bw.goods.mvvm.model.entity.HomeMenuEntity;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;

/**
 * @author KK
 * @description:
 * @date :2021/10/14 19:22
 */
public class HomeMenuAdapter extends BaseQuickAdapter<HomeMenuEntity, BaseViewHolder> {
    public HomeMenuAdapter() {
        super(R.layout.item_home_menu);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, HomeMenuEntity homeMenuEntity) {
        baseViewHolder.setText(R.id.home_menu_tv,homeMenuEntity.title);
        baseViewHolder.setImageResource(R.id.home_menu_img,homeMenuEntity.iconId);
    }
}
